#pragma once

#include "SocketClientCmd.h"
#include <mutex>

class SocketCommClient : public SocketClientCmd
{
	Q_OBJECT
public:
	SocketCommClient(QObject *parent=nullptr);
	~SocketCommClient();
public:
	virtual void Init(const char* servIp, int servPort, MSC::CommMode mode, const char* connName) override;
	virtual void SendData(MSC::StFixedData FixedData, QString RegName)override;
	virtual void SendDataProFunc()override;
	virtual void OnRecvData(const StFixedData* Pkt)override;
	virtual void RecvDataProFunc()override;

protected:
	std::list<MSS::StFixedData>  mHandleResponseData;//
	std::list<MSS::StFixedData>  mHandleRecvData;
	std::queue<_SendFixedData>   mSendData;
	std::mutex mHandleResponseDataMutex, mHandleRecvDataMutex, mSendDataMutex;
	int mHeartBeatCammandID = (int)CommandID::HeartBeat;
};
